<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8" />
		<title>2.回调地狱</title>
		<script src="https://cdn.bootcdn.net/ajax/libs/axios/1.1.2/axios.js"></script>
		<script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.1/jquery.js"></script>
	</head>
	<body>
		<script type="text/javascript" >
			send()
			async function send (){
				try {
					let r1 = await axios.get('http://localhost:3000/posts')
					console.log('@@@',r1.data)
					let r2 = await axios.get('http://localhost:3000/posts')
					console.log(r2.data)
					let r3 = await axios.get('http://localhost:3000/posts')
					console.log(r3.data)
				} catch (error) {
					console.log('请求出错了',error)
				}
			}

		</script>
	</body>
</html>